﻿
@{
    ViewBag.Title = "";
    Layout = "~/Views/Shared/_LayoutPay.cshtml";
}
@model Pay.Model.Model.MerchantInfo
<link href="~/Content/layui.css" rel="stylesheet" />
@section scripts{
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/Scripts/layer.js"></script>
    <script>
        function addSuccess(data)
        {
            parent.layer.msg(data.msg);
        }
        $("#FeeRate").bind("keyup", function () {
            $("#FeeRate").val($("#FeeRate").val().replace(/[^\-?\d.]/g, ''));
        });
    </script>
}
@{ 

    var temp = (Model.FeeRate * 100).ToString("F2");
}
<div class="ibox-content">
  
    @using (Ajax.BeginForm("updatefee", null, new AjaxOptions { HttpMethod = "post", OnSuccess = "addSuccess", UpdateTargetId = "articles", InsertionMode = InsertionMode.Replace }, new { id = "search", @class = "form-horizontal" }))
    {
        <input type="hidden" value="@Model.Id" name="id"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">当前用户：</label>
            <div class="col-sm-8">
                <input type="text" disabled="disabled" class="form-control" value="@ViewBag.MerchantName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">当前费率：</label>
            <div class="col-sm-8">
                <input type="text" disabled="disabled" class="form-control" value="@temp %">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">新费率：</label>
            <div class="col-sm-8">
                <input type="text" placeholder="新费率" id="FeeRate" class="form-control" name="FeeRate" maxlength="18" required>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-8">
                <input class="btn btn-primary" type="submit" value="确定">
                <input class="btn btn-restore" type="reset" value="重置">
            </div>
        </div>
    }
</div>